package ${packageName}.module.${moduleName}.po;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.unitd.base.frame.plugins.module.model.MybatisBaseEntity;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
<#list model_column as model>
	<#if (model.columnType = 'DECIMAL')>
		import java.math.BigDecimal;
	</#if>
	<#if (model.columnType = 'TIMESTAMP' || model.columnType = 'DATETIME')>
		import java.util.Date;
	</#if>
</#list>

/**
 * ${tableDesc}信息实体对象
 *
 * @filename ${className}.java
 * @copyright www.unitd.com
 * @author ${author}
 * @version 1.0
 * @date ${date}
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "${tableName}")
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ${className}PO extends MybatisBaseEntity {

<#if model_column?exists>
	<#list model_column as model>
	/** ${model.columnComment!} */
	@Column(name = "${model.columnName}")
		<#if (model.columnType = 'BIT' || model.columnType = 'INT' || model.columnType = 'INTEGER')>
	private Integer ${model.changeColumnName?uncap_first};
		</#if>
		<#if (model.columnType = 'BIGINT')>
	private Long ${model.changeColumnName?uncap_first};
		</#if>
		<#if (model.columnType = 'DECIMAL')>
	private BigDecimal ${model.changeColumnName?uncap_first};
		</#if>
		<#if (model.columnType = 'CHAR' || model.columnType = 'VARCHAR' || model.columnType = 'TEXT')>
	private String ${model.changeColumnName?uncap_first};
		</#if>
		<#if (model.columnType = 'TIMESTAMP' || model.columnType = 'DATETIME')>
	private Date ${model.changeColumnName?uncap_first};
		</#if>
	</#list>
</#if>
}